package com.cn.zy.zheda.demo.job;

import com.cn.zy.zheda.demo.controller.AlarmController;
import com.cn.zy.zheda.demo.service.AlarmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author zhangyi
 * @date 2018/12/19 18:41
 */
@Component
public class ScheduledJob {

    @Autowired
    private AlarmService alarmService;


    /**
     * 定时请求数据(一分钟一次)
     *
     */
//    @Scheduled(fixedDelay = 60000)
    @Scheduled(cron = "0 0/1 * * * ?")
    public void delay(){

        System.out.println("待写...");
    }
}
